//
//      Copyright Timothy Evans 2014 2015    timothy.evans@gsecraif.org
//
//      This file is part of gsecraif.
//
//      gsecraif is free software; you can redistribute it and/or modify
//      it under the terms of the GNU General Public License as published by
//      the Free Software Foundation; either version 3 of the License, or
//      (at your option) any later version.
//
// errors_text
// to be included in .h files
// defines error messages
//
#ifndef ERRORS_TEXT_H
#define ERRORS_TEXT_H
//
// errors in split_functions.cpp:
//
#define ERR_STDIN "Error: Cannot open standard in.\n"
/*
<para>When splitting a file, gsecraif reads from standard-in.  This error indicates that unusual conditions have prevented gsecraif from opening standard-in (e.g the system has exceeded the maximum number of open files)</para>
*/
#define ERR_OPEN_OUT_FILE "Error: Cannot open output file "    // note training space; text if followed by filename
/*
<para>Gsecraif cannot open one or more of the component files.  The filename may be invalid (e.g. non-existent directory path) or the destination may not be writeable.</para>
*/
//
// errors in comb_functions.cpp
//
#define ERR_STDOUT "Error: Cannot open standard out.\n"
/*
<para>When combining files, gsecraif sends the output to standard-out.  This error indicates that unusual conditions have prevented gsecraif from opening standard-out (e.g the system has exceeded the maximum number of open files)</para>
*/
#define ERR_OPEN_IN_FILE "Cannot open input file "    // note training space; text if followed by filename
// This is non fatal
/*
<para>Gsecraif cannot open one or more of the component files.  The filename may be invalid (e.g. non-existent directory path) or the destination may not be readable.</para>
*/
#define ERR_MULTIPLE_IN "Error: multiple files can not be opened.\n"
/*
<para>Because gsecraif uses XOR parity (RAID 5 technology), it can recover from at most one missing file.  The error is show when gsecraif failed to open two or more component files.</para>
*/
#define ERR_FORMAT "Error: File format of one or more component files is incorrect.\n"
/*
<para>Each component file has a defined structure, this error indicates that one or more component files are corrupt.</para>
*/
#define ERR_FILE_CORRUPT "Error: One or more component files are corrupt.\n"
/*
<para>This error occurs when gsecraif finishes reading one or more component files too soon; all component files should be the same size and end with a byte indicating the number of pad bytes used (if any).</para>
*/
#define ERR_PAD_BYTE "\nError: Bad pad byte, component file id: "    // note training space; text if followed by filename
#define ERR_PAD_VALUE " Pad value: "    // extra text used
/*
<para>All component files should end with the same byte value indicating the number of pad bytes used.  The error shows a component files with an inconistent number of pad bytes.</para>
*/
#define ERR_FORMAT_VERSION "Error: Bad file format version.\n"
/*
<para>The first byte of each component file is the file format version which should be 1 for this version of gsecraif.  The error indicates that either the component file was created with a later version of gesecraif or is corrupt.</para>
*/
#define ERR_INCONSISTENT "Error: Inconsistent number of component files.\n"
/*
<para>All component files should agree on the number of component files; the error indicates that this is not the case for one or more component files.</para>
*/
#define ERR_DUPLICATE_ZERO "Error: duplicate file id zero.\n"
/*
<para>Each component files should have a unique id; the error shows that two or more files share the id 0.</para>
*/
#define ERR_DUP_ID "Error: Duplicate file id.\n"
/*
<para>The error shows that two or more files share the same id.</para>
*/
#define ERR_ROT_VALUE "Error: Inconsistent rotation value.\n"
/*
<para>All components should agree on the value of the rotation used; the error shows that one or more component files disagree on this value.</para>
*/
//
#endif /* not ERRORS_TEXT_H */
